<?php
defined('IN_TS') or die('Access Denied.');
//插件编辑
switch($ts){
	case "set":
		$arrLink = PluginCacheRead('pubs','links','data.php');
		
		$title = '编辑友情连接插件';
		include 'edit_set.html';
		break;
		
	case "do":
		$arrLinkName = $_POST['linkname'];
		$arrLinkUrl = $_POST['linkurl'];
		
		foreach($arrLinkName as $key=>$item){
			$linkname = trim($item);
			if($linkname != ''){
				$arrLink[] = array(
					'linkname'	=> $linkname,
					'linkurl'	=> $arrLinkUrl[$key],
				);
			}
			
		}
		
		PluginCacheWrite($arrLink,'pubs','links','data.php');
		
		qiMsg("修改成功！");
		break;
}